g_array_unref (pid_indices_to_remove);
}
+static void
+on_dialog_response (GtkDialog *dialog,
+ int response)
+{
+ /* GTK_RESPONSE_NONE means the dialog were programmatically destroy, e.g. that
+ * GTK_DIALOG_DESTROY_WITH_PARENT kicked in - so it would trigger a warning to
+ * destroy the dialog in that case
+ */
+ if (response != GTK_RESPONSE_NONE)
+ gtk_window_destroy (GTK_WINDOW (dialog));
+}
+
static void
on_end_process_activated (GtkModelButton *button,
gpointer user_data)
if (!_gtk_mount_operation_kill_process (pid_to_kill, &error))
{
GtkWidget *dialog;
- gint response;
/* Use GTK_DIALOG_DESTROY_WITH_PARENT here since the parent dialog can be
* indeed be destroyed via the GMountOperation::abort signal... for example,
error->message);
gtk_widget_show (dialog);
- response = gtk_dialog_run (GTK_DIALOG (dialog));
- /* GTK_RESPONSE_NONE means the dialog were programmatically destroy, e.g. that
- * GTK_DIALOG_DESTROY_WITH_PARENT kicked in - so it would trigger a warning to
- * destroy the dialog in that case
- */
- if (response != GTK_RESPONSE_NONE)
- gtk_window_destroy (GTK_WINDOW (dialog));
+ g_signal_connect (dialog, "response", G_CALLBACK (on_dialog_response), NULL);
g_error_free (error);
}